package edu.nf.dao.impl;



import edu.nf.SQLExecutor;
import edu.nf.beans.annotations.Component;
import edu.nf.dao.MatchDepartmDao;
import edu.nf.handler.MapListHandler;
import edu.nf.utils.DBUtil;

import java.util.List;
import java.util.Map;

@Component("matchDepatmDao")
public class MatchDepartmDaoImpl implements MatchDepartmDao {


    @Override
    public List<Map<String, Object>> matchDepartm(String departmId) {
        String sql = "SELECT EMP_ID, EMP_NAME, EMP_SEX,EMP_PAY, DEPARTM_NAME FROM EMP_INFO S INNER JOIN DEPARTM_INFO D ON E.EMP_DEPARTMID = D.DEPARTM_ID WHERE STU_STATUS=1 AND S.STU_CLASSID=?";
        SQLExecutor se = new SQLExecutor(DBUtil.getConnection());
        MapListHandler handler = new MapListHandler();
        return se.executeQuery(sql, handler, departmId);
    }
}
